$(document).ready(function(){
	$('pageSelect').change(function(){
		$(this).closest('form').submit();
	});
	
	 $('#tabs-dk > ul > li ').each(function (index, element) {
		    $(element).click(function () {         
		if(index==2){
				 var url="dangkymonthi.php";
				 var masv=$("#mssv").data('mssv1');
				 var mamon=$("#mamh").data('mamh1')
				 var login=true;
				 var param = {'masv':masv,'login':login};
				 var img = "<img src='images/ajax_loading.gif' />"
				$.ajax({
					url:url,
					data: param,
					type: "POST",
					dataType: "HTML",
					error: function(){},
					beforeSend: function(){			 
						$('#tabs-3').html('');
						$('#tabs-3').html(img);
					},
					complete: function(){
						 
					},
					success: function(data){
						if (data){
							$('#tabs-3').html('');
							$('#tabs-3').html(data);
						}else{
							$('#tabs-3').html('');
							var info = "<div class='alert alert-warning'>KhĂ´ng tĂ¬m tháº¥y sinh viĂªn cá»§a lá»›p nĂ y.</div>";
							$('#tabs-3').html(info);
						}
						
					}
					
				});
					
			}
		      
			$('#tabs-dk').tabs('load', index); 
		    	
		    });
	 });
});